package com.kotlin.base.di

import com.kotlin.base.ContextProvider
import dagger.hilt.EntryPoints

inline fun <reified T> get(): T {
    return EntryPoints.get(ContextProvider.context, T::class.java)
}


/**
 * 子线程
 */
fun getCoroutineContext() = get<NetSource>().getCoroutineContext()

/**
 *  错误信息
 */
fun getError() = get<NetSource>().getError()



/**\
 * 判断网络
 */
fun getNetwork() = get<NetSource>().getNetwork()